//自定义config

CKEDITOR.editorConfig = function (config) {

    config.toolbar = [
        {name: 'document', items: ['Print']},
        {name: 'clipboard', items: ['Undo', 'Redo']},
        {name: 'styles', items: ['Format', 'Font', 'FontSize', 'lineheight']},
        {name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CopyFormatting']},
        {name: 'colors', items: ['TextColor', 'BGColor']},
        {name: 'align', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']},
        {name: 'links', items: ['Link', 'Unlink']},
        {name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote']},
        {name: 'insert', items: ['Image', 'EmbedSemantic', 'Table']},
        {name: 'editing', items: ['Scayt']}
    ];

	config.extraPlugins = 'autoembed,autogrow,embedsemantic,image2,uploadimage,lineheight';
	
	config.removePlugins = 'image,uploadfile';
	
	config.height = 600;
	
	config.toolbar_module = [
		{name: 'document', items: ['Source','Print']},
        {name: 'clipboard', items: ['Undo', 'Redo']},
        {name: 'styles', items: ['Format', 'Font', 'FontSize', 'lineheight']},
        {name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CopyFormatting']},
        {name: 'colors', items: ['TextColor', 'BGColor']},
        {name: 'align', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']},
        {name: 'links', items: ['Link', 'Unlink']},
        {name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote']},
        {name: 'insert', items: ['Image', 'EmbedSemantic', 'Table']},
        {name: 'editing', items: ['Scayt']}
	],

//	config.filebrowserBrowseUrl='http://x1.t1.laisj.com/ckfinder/ckfinder.html';
//	config.filebrowserUploadUrl= 'http://x1.t1.laisj.com/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';
//	config.contentsCss =  [ 'http://static.laisj.com/v3/ckeditor/contents.css', 'http://static.laisj.com/v3/ckeditor/mystyles.css' ];
// 	config.stylesSet  = 'my_styles:/contents.css';
//	config.bodyClass = 'article-editor',


    config.format_tags = 'p;h1;h2;h3;pre';
    config.removeDialogTabs = 'image:advanced;link:advanced';

    config.stylesSet = [
        /* Inline Styles */
        {name: 'Marker', element: 'span', attributes: {'class': 'marker'}},
        {name: 'Cited Work', element: 'cite'},
        {name: 'Inline Quotation', element: 'q'},

        /* Object Styles */
        {
            name: 'Special Container',
            element: 'div',
            styles: {
                padding: '5px 10px',
                background: '#eee',
                border: '1px solid #ccc'
            }
        },
        {
            name: 'Compact table',
            element: 'table',
            attributes: {
                cellpadding: '5',
                cellspacing: '0',
                border: '1',
                bordercolor: '#ccc'
            },
            styles: {
                'border-collapse': 'collapse'
            }
		},
		
        {name: 'Borderless Table', element: 'table', styles: {'border-style': 'hidden', 'background-color': '#E6E6FA'}},
        {name: 'Square Bulleted List', element: 'ul', styles: {'list-style-type': 'square'}},

        /* Widget Styles */
        // We use this one to style the brownie picture.
		{name: 'Illustration', type: 'widget', widget: 'image', attributes: {'class': 'image-illustration'}},
		
        // Media embed
        {name: '240p', type: 'widget', widget: 'embedSemantic', attributes: {'class': 'embed-240p'}},
        {name: '360p', type: 'widget', widget: 'embedSemantic', attributes: {'class': 'embed-360p'}},
        {name: '480p', type: 'widget', widget: 'embedSemantic', attributes: {'class': 'embed-480p'}},
        {name: '720p', type: 'widget', widget: 'embedSemantic', attributes: {'class': 'embed-720p'}},
        {name: '1080p', type: 'widget', widget: 'embedSemantic', attributes: {'class': 'embed-1080p'}}
    ];
};
